package com.lei.design.command.light;

import com.lei.design.command.Command;

/**
 * @Author LeiXiaoLei
 * @Date 2022/5/20 10:49
 * @Version 1.0
 */
public class LightOffCommand implements Command {
    private Light light;

    public LightOffCommand(Light light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.off();
    }

    @Override
    public void undo() {
        light.on();
    }
}
